package good.idea.data.demo.score;

import good.idea.data.excel.call.DataLoadChannel;
import good.idea.data.excel.domain.PageData;
import good.idea.data.excel.write.ExcelWriteTask;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class ScoreDataLoadChannel implements DataLoadChannel {


    @Override
    public Object loadData(PageData pageData, ExcelWriteTask writeTask, Object item) {

        List list = new ArrayList();
        for (int i = 0; i < 12; i++) {
            Map map = new HashMap<>();
            map.put("title", "2021年3年级3班级成绩");
            map.put("page", (i + 1) + "/13");
            map.put("xq", "第一学期");
            map.put("pageIndex", i);

            list.add(map);
        }
        if (pageData.getCurrPage() > 0) {
            return null;
        }
        return list;
    }
}
